import AdminLayout from '@/views/admin/AdminLayout.vue'
import AdminDashboard from '@/views/admin/Dashboard.vue'
import MaterialList from '@/views/admin/materials/List.vue'
import MaterialCategories from '@/views/admin/materials/Categories.vue'
import MaterialTags from '@/views/admin/materials/Tags.vue'
import UserList from '@/views/admin/users/List.vue'
import UserVIP from '@/views/admin/users/VIP.vue'
import RechargeList from '@/views/admin/finance/Recharges.vue'
import ConsumptionList from '@/views/admin/finance/Consumptions.vue'
import OperationLogs from '@/views/admin/Logs.vue'

export default [
  {
    path: '/admin',
    component: AdminLayout,
    meta: { requiresAuth: true, requiresAdmin: true },
    children: [
      {
        path: 'dashboard',
        name: 'AdminDashboard',
        component: AdminDashboard,
        meta: { title: '数据概览' }
      },
      {
        path: 'materials/list',
        name: 'MaterialList',
        component: MaterialList,
        meta: { title: '资料列表' }
      },
      {
        path: 'materials/categories',
        name: 'MaterialCategories',
        component: MaterialCategories,
        meta: { title: '分类管理' }
      },
      {
        path: 'materials/tags',
        name: 'MaterialTags',
        component: MaterialTags,
        meta: { title: '标签管理' }
      },
      {
        path: 'users/list',
        name: 'UserList',
        component: UserList,
        meta: { title: '用户列表' }
      },
      {
        path: 'users/vip',
        name: 'UserVIP',
        component: UserVIP,
        meta: { title: 'VIP管理' }
      },
      {
        path: 'finance/recharges',
        name: 'RechargeList',
        component: RechargeList,
        meta: { title: '充值记录' }
      },
      {
        path: 'finance/consumptions',
        name: 'ConsumptionList',
        component: ConsumptionList,
        meta: { title: '消费记录' }
      },
      {
        path: 'logs',
        name: 'OperationLogs',
        component: OperationLogs,
        meta: { title: '操作日志' }
      },
      {
        path: 'images',
        name: 'ImageManagement',
        component: () => import('@/views/admin/ImageManagement.vue'),
        meta: { title: '图片管理' }
      },
      {
        path: '',
        redirect: '/admin/dashboard'
      }
    ]
  }
]